<?php

/**
  彩票信息模块 
 */

namespace McWin\Controller;
use Common\Controller\HomebaseController;
// load("@.myfunc");

class NmgK3Controller extends HomebaseController {

	function _initialize(){}


	/**
	 *  读取赔率数据.
	 *	nmg_k3: 内蒙古快3
	 *  bj_cars: 北京赛车
	 *
	 */	
	

	/**
	 * @return 北京赛车 发送开奖信息.
	 */
	public function sendOpen(){		
		// 内蒙古 快3
			// 赔率
			$D = D('OddsNmgK3');
			$odds = $D -> get_odds();
			if($odds)
				$data['odds'] = $odds;
			
			// 投注上限
			$D = D('UpLimitNmgK3');
			$upLimit = $D -> get_Up_Limit();
			if($upLimit)
				$data['upLimit'] = $upLimit;

		
		if($data == null){
			$this->return_data_error('-2') ;
			return;
		}
		
		// 加上彩种
		$data['type'] = $type;
		$this->return_data($data);		
	}

	/**
	 * 发送赔率和投注上限信息.
	 * @return [type]
	 */
	public function sendOdds(){		
		// 加上彩种
		$data['type'] = 'nmg_k3';

		// 赔率
		$D = D('OddsNmgK3');
		$odds = $D -> get_odds();
		if($odds)
			$data['odds'] = $odds;
		
		// 投注上限
		$D = D('UpLimitNmgK3');
		$upLimit = $D -> get_Up_Limit();
		if($upLimit)
			$data['upLimit'] = $upLimit;
		
		$this->return_data($data);	
	}
	
}